
# num = lambda a,b:a*b
# print(num(100,200))
# def num():
#     n = int(input("请输入一个整数"))
#     if n % 2 == 0:
#         print(f'{n}为偶数')
#     else:
#         print(f'{n}为奇数')
# num()
# result = 0
# for i in range(1,100,2):
#     result += i
#     i += 1
# print(result)
# class Animal(object):
#     animal_type = '狗'
#     def __init__(self,name,age):
#         self.name = name
#         self.__age = age
#     def eat(self):
#         print("狗吃骨头")
# num = Animal('小黄',0)
# num.eat()
# # 对象调用方法

import json
num = {"name":"小明","sex":"男生","age":20,"school":"清华大学","type":["1岁的狗","2岁的猫","3岁的猪"],"num":[2,5,8]}
with open("data.json","w",encoding="utf-8") as f:
    json.dump(num,f,ensure_ascii=False)


